package com.lantosec.hmrp.modules.eval.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.eval.vo.EvalTaskEventVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 考评任务项目事件 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EvalTaskEvent extends BaseEntity<EvalTaskEventVO> {

    private static final long serialVersionUID = 1L;
    public EvalTaskEvent(EvalTaskEventVO vo){
        this.evalTaskEventId = vo.getEvalTaskEventId();
        this.evalDetailedItemId = vo.getEvalDetailedItemId();
        this.evalDetailedId = vo.getEvalDetailedId();
        this.evalTaskId = vo.getEvalTaskId();
        this.evalItemId = vo.getEvalItemId();
        this.eventDate = vo.getEventDate();
        this.rewardOrientation = vo.getRewardOrientation();
        this.rewardType = vo.getRewardType();
        this.rewardValue = vo.getRewardValue();
        this.eventDescribe = vo.getEventDescribe();
        this.evidencePhotoList = vo.getEvidencePhotoList();
        this.extraDuty = vo.getExtraDuty();
        this.createUserId = vo.getCreateUserId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.reviewState = vo.getReviewState();
        this.reviewUser = vo.getReviewUser();
        this.reviewUserId = vo.getReviewUserId();
        this.reviewTime = vo.getReviewTime();
        this.reviewRemark = vo.getReviewRemark();
    }

    @Override
    public EvalTaskEventVO convertToVO(){
        return new EvalTaskEventVO(this);
    }


    /**
     * 考评项目事件ID
     */
    @TableId(value = "eval_task_event_id", type = IdType.AUTO)
    private Integer evalTaskEventId;

    /**
     * 考评明细项ID
     */
    private Integer evalDetailedItemId;

    /**
     * 考评明细ID
     */
    private Integer evalDetailedId;

    /**
     * 考评任务ID
     */
    private Integer evalTaskId;

    /**
     * 考评项目ID
     */
    private String evalItemId;

    /**
     * 事件发生时间(yyyy-MM-dd)
     */
    private String eventDate;

    /**
     * 奖惩方向(1分2钱)
     */
    private Integer rewardOrientation;

    /**
     * 奖惩形式(1奖2惩3奖与惩)
     */
    private Integer rewardType;

    /**
     * 奖惩值(正为加  负为扣)
     */
    private BigDecimal rewardValue;

    /**
     * 事件描述
     */
    private String eventDescribe;

    /**
     * 现场取证图片
     */
    private String evidencePhotoList;

    /**
     * 是否有追加责任(0:否 1:是)
     */
    private Integer extraDuty;

    /**
     * 创建人ID
     */
    private String createUserId;

    /**
     * 创建人
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * "审核状态"
      */
    private Integer reviewState;

    /**
     * "审核人ID
     */
    private String reviewUserId;

    /**
     * "审核人
     */
    private String reviewUser;

    /**
     * "审核时间
     */
    private Date reviewTime;

    /**
     * "审核意见"
     */
    private String reviewRemark;


    public enum ColName {
        eval_task_event_id, eval_detailed_item_id, eval_detailed_id, eval_task_id, event_date, reward_orientation, reward_type, reward_value, event_describe, evidence_photo_list, extra_duty, create_user_id, create_user, create_time, review_state, review_user_id, review_user, review_time, review_remark,
    }
}
